package com.example.task.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.TaskScheduler;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;

/**
 * @author void
 * @date 2020/6/16 22:15
 * @desc
 */
@Configuration
public class TaskConfig {

//    @Bean
//    public TaskScheduler taskScheduler(){
//        ThreadPoolTaskScheduler taskScheduler = new ThreadPoolTaskScheduler();
//        //定义线程池数量为2 个
//        taskScheduler.setPoolSize(3);
//        return taskScheduler ;
//    }
}
